package org.dromara.genealogy.domain.bo;

import org.dromara.genealogy.domain.GeNameChildren;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 子女信息业务对象 ge_name_children
 *
 * @author qianjunmo
 * @date 2025-09-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = GeNameChildren.class, reverseConvertGenerate = false)
public class GeNameChildrenBo extends BaseEntity {

    /**
     * 主键id
     */
    private Long id;

    /**
     * 谱名
     */
    private String name;

    /**
     * 姓氏
     */
    @NotBlank(message = "姓氏不能为空", groups = { AddGroup.class, EditGroup.class })
    private String lastName;

    /**
     * 父节点
     */
    private Long parentId;

    /**
     * 关系(生、抚子等)
     */
    @NotBlank(message = "关系(生、抚子等)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String relation;

    /**
     * 父母名称
     */
    @NotBlank(message = "父母名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String parentName;

    /**
     * 排行
     */
    @NotBlank(message = "排行不能为空", groups = { AddGroup.class, EditGroup.class })
    private String rank;

    /**
     * 性别
     */
    @NotBlank(message = "性别不能为空", groups = { AddGroup.class, EditGroup.class })
    private String gender;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sorted;


}
